import { getFldm } from '@/utils/get-fldm'
export const formItem = async (key: string) => {
  const obj: any = {
    gdyjCqyj: [
      {
        disabled: false,
        label: '承办单位',
        prop: 'cbdwbmList',
        type: 'treeSelectAll',
        showAll: true,
        placeholder: '请输入承办单位',
        multiple: true,
        options: [],
        required: false,
        clearable: false,
        isLeafNode: false,
        checkStrictly: true,
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '承办部门',
        prop: 'cbbmbmList',
        multiple: true,
        clearable: false,
        showAll: true,
        type: 'treeSelectAll',
        placeholder: '请选择承办部门',
        options: [],
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '检察官',
        prop: 'jcg',
        type: 'input',
        placeholder: '请输入检察官',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件名称',
        prop: 'ajmc',
        type: 'input',
        placeholder: '请输入案件名称',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '部门受案号',
        prop: 'bmsah',
        placeholder: '请输入部门受案号',
        type: 'input',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '统一受案号',
        prop: 'tysah',
        placeholder: '请输入统一受案号',
        type: 'input',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案件类别',
        prop: 'ajlbbm',
        type: 'treeSelectAll',
        showAllSelection: true,
        showCurrentButton: true,
        nodeKey: 'dm',
        isLeafNode: false,
        multiple: true,
        showAll: true,
        treeProps: {
          children: 'children',
          label: 'mc',
        },
        checkStrictly: false,
        placeholder: '请选择案件类别',
        options: [],
        iswm: 'N',
      },
      {
        disabled: false,
        label: '办结日期',
        prop: 'bj-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '案卷类别',
        prop: 'ajlxbm',
        placeholder: '请选择案卷类别',
        type: 'select',
        options: await getFldm('gd024'),
        iswm: 'N',
      },
      {
        disabled: false,
        label: '归档人',
        prop: 'gdr',
        placeholder: '请输入归档人',
        type: 'input',
        iswm: 'N',
      },

      {
        disabled: false,
        label: '提交日期',
        prop: 'tj-rq',
        placeholder: '请选择提交日期',
        type: 'daterange',
        iswm: 'N',
      },

      {
        disabled: false,
        label: '审核状态',
        prop: 'shztbm',
        placeholder: '请选择审核状态',
        options: await getFldm('gd019'),
        type: 'select',
        iswm: 'N',
      },

      {
        disabled: false,
        label: '归档状态',
        prop: 'gdztbm',
        type: 'select',
        placeholder: '请选择归档状态',
        options: await getFldm('gd014'),
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '归档日期',
        prop: 'gd-rq',
        type: 'daterange',
        placeholderStart: '请选择开始日期',
        placeholderEnd: '请选择结束日期',
        iswm: 'Y',
      },
      {
        disabled: false,
        label: '档号',
        prop: 'dh',
        type: 'input',
        placeholder: '请输入档号',
        iswm: 'N',
      },
      {
        disabled: false,
        label: '预警状态',
        prop: 'yjztbm',
        type: 'select',
        options: [
          {
            dm: '0',
            mc: '无',
          },
          {
            dm: '1',
            mc: '预警',
          },
          {
            dm: '2',
            mc: '超期',
          },
        ],
        placeholder: '请选择预警状态',
        iswm: 'N',
      },
      {
        disabled: false,
        label: '案卷退改',
        prop: 'tgztdm',
        type: 'select',
        options: [
          {
            dm: '0',
            mc: '无',
          },
          {
            dm: '1',
            mc: '有',
          },
        ],
        placeholder: '请选择案卷退改状态',
        iswm: 'N',
      },
    ],
  }
  return obj[key]
}
